"""
ESP32 network module stubs
"""

from typing import Optional, List, Tuple

class WLAN:
    """WiFi network interface"""

    # Interface types
    STA_IF: int
    AP_IF: int

    # Authentication modes
    AUTH_OPEN: int
    AUTH_WEP: int
    AUTH_WPA_PSK: int
    AUTH_WPA2_PSK: int
    AUTH_WPA_WPA2_PSK: int

    def __init__(self, interface_id: int) -> None:
        """Create a WLAN object"""
        ...

    def active(self, is_active: Optional[bool] = None) -> bool:
        """Activate or deactivate the interface"""
        ...

    def connect(self, ssid: str, password: str) -> None:
        """Connect to a WiFi network"""
        ...

    def disconnect(self) -> None:
        """Disconnect from WiFi"""
        ...

    def scan(self) -> List[Tuple]:
        """Scan for available networks"""
        ...

    def isconnected(self) -> bool:
        """Check if connected"""
        ...

    def ifconfig(self, config: Optional[Tuple] = None) -> Tuple:
        """Get or set IP configuration"""
        ...

    def config(self, param: str = None, **kwargs) -> any:
        """Get or set interface configuration"""
        ...

    def status(self, param: Optional[str] = None) -> any:
        """Get connection status"""
        ...
